home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / misc / TownMaze.lha / TownMaze / src.lzh / townmain.c < prev    next >
C/C++ Source or Header  |  1991-08-04  |  996b  |  59 lines

  1. /*
  2. ** townmain.c  Copyright 1991 Kent Paul Dolan,
  3. **             Mountain View, CA, USA 94039-0755
  4. **
  5. ** Written to satisfy an inquiry on USENet's rec.games.programmer newsgroup.
  6. ** May be freely used or modified in any non-commercial work.  Copyrighted
  7. ** only to prevent patenting by someone else.
  8. */
  9.  
  10. #include <stdio.h>
  11. #define MAINLINE 1
  12. #include "townmaze.h"
  13. #include "townproto.h"
  14.  
  15. #ifdef __STDC__
  16. void main(int argc,char *argv[])
  17. #else
  18. int main(argc,argv)
  19.   int argc;
  20.   char *argv[];
  21. #endif
  22. {
  23.  
  24.   SEEDRANDOM(randomseed = time(0));
  25.   getargs(argc,argv);
  26.   makespace();
  27.   fillmaze();
  28.   filllist();
  29.   makeunused();
  30.   makegates();
  31.   makecourts();
  32. #if SHOWSTART
  33.   showdebugmaze();
  34. #endif
  35.   connectstreets();
  36.   finishalleys();
  37.   closedoors();
  38.   closegates();
  39.   cleanupmap();
  40. /*
  41. #if PROGRESS
  42.   fprintf(stderr,"\n");
  43. #endif
  44.   showlistsummary();
  45.   showlistdetail();
  46. */
  47. #if SHOWEND
  48. #if PROGRESS
  49.   fprintf(stderr,"\n");
  50. #endif
  51.   showdebugmaze();
  52. #endif
  53.   showmaze();
  54.   freespace();
  55. /*
  56. */
  57.   exit(0);
  58. }
  59.